package memorphic.slide
{
	import memorphic.core.ICommand;

	public class NavigationCommand implements ICommand
	{
		
		public static function createHomeCommand(stateManager:StateManager):ICommand
		{
			return new NavigationCommand(stateManager, stateManager.homeStateURI);
		}
		
		
		protected var stateManager:StateManager;
		protected var stateURI:String;
		
		public function NavigationCommand(stateManager:StateManager, stateURI:String)
		{
			this.stateManager = stateManager;
			this.stateURI = stateURI;
		}
		

		public function execute():void
		{
			setModelState();
			setViewState();
		}
		
		
		protected function setModelState():void
		{
			
		}
		
		
		
		protected function setViewState():void
		{
			stateManager.stateURI = stateURI;
		}

		
	}
}